package info.techgeek.labs.patterns.abstractFactoryPatternGarden;

public class GardenMaker
{
//Abstract Factory which returns one of three gardens
private Garden gd;

	public Garden getGarden(String gtype)
	{
		gd = new VegieGarden(); //default
		if(gtype.equals("Perennial"))
			gd = new PerennialGarden();
		if(gtype.equals("Annual"))
			gd = new AnnualGarden();
		
		System.out.println("Border "+gd.getBorder().getName());
		return gd;
	}
	public static void main (String args[]){
		
		GardenMaker maker = new GardenMaker();
		maker.getGarden("Perennial");
	}
	
}